home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Power Pack / Visual_Basic4_Power_Pack.bin / vb4files / vbmaxlcd / read me.txt < prev    next >
Encoding:
Text File  |  1996-11-20  |  12.2 KB  |  373 lines

  1. VBMAX LIQUID CRYSTAL DISPLAY DLL
  2.  
  3. Copyright ⌐ 1995 - 1996 Mike Stanley.  All Rights Reserved.
  4.                             VBMax - Visual Basic to the Max
  5.  
  6.  
  7. TABLE OF CONTENTS
  8.  
  9. - Description
  10. - Registration
  11. - Important-Use at Your Own Risk!
  12. - Installation
  13. - Frequently Asked Questions
  14. - Technical Support
  15. - Gronked Files
  16. - Packing List
  17. - How to use the DLL
  18. - Methods Summary
  19. - Properties Summary
  20. - Notes on Color Selection
  21.  
  22.  
  23.  
  24. DESCRIPTION
  25.  
  26. A fully functional in-process OLE server for adding LCD style controls to your 
  27. VB 4.0 applications. 
  28.  
  29. VBMaxLCD.dll contains methods and properties for setting the digit and background 
  30. colors, autosizing the display, blinking colons, flashing digits, showing or 
  31. hiding unlit segments and aligning digits left, right or centered.
  32.  
  33. Written entirely in VB 4.0, VBMaxLCD.dll provides all the functionality of a 
  34. third-party control but without the overhead.
  35.  
  36. Not only that but you get the source code too, so you can see how it works and 
  37. can tweak it any way you want to suit your own needs.
  38.  
  39.  
  40.  
  41. REGISTRATION
  42.  
  43. This is a shareware utility which you can register for US $5 per copy.  
  44. Please send payment to:
  45.  
  46.   Mike Stanley
  47.   25 Lansdowne Street
  48.   Manchester
  49.   NH 03103
  50.   USA
  51.  
  52. In return, I will give you a registration ID and an encryption key which will 
  53. allow you to unlock the source code from the file 'VBMaxLCD Source Code.grk'.
  54.  
  55. *** Don't forget to include your Internet e-mail address. ***
  56.  
  57. Better still, also send me an e-mail to let me know that your registration is 
  58. on the way.  
  59.  
  60. Any future updates to the software will use the same encryption key, so you can 
  61. always get them at no additional cost.
  62.  
  63. If you don't have an e-mail address, you can receive the registration ID and 
  64. encryption key via snail-mail by sending me a postage-paid self-addressed envelope.
  65.  
  66.  
  67.  
  68. IMPORTANT-USE AT YOUR OWN RISK!
  69.  
  70. While every effort has been made to ensure a reliable, high-quality product, you 
  71. should note that this software is provided 'as is' without any kind of warranty 
  72. whatsoever, neither explicit nor implied.
  73.  
  74. In order to use this software, you must agree 100% that I will not be held liable 
  75. in any way, shape or form (not even a little bit) for anything untoward that befalls 
  76. anyone or anything, either directly or indirectly, as a result of using this software 
  77. no matter how calamitous, disastrous or inauspicious the occasion may be.
  78.  
  79. Your use of this software constitutes acceptance of these terms.
  80.  
  81.  
  82.  
  83. INSTALLATION
  84.  
  85. Copy the files to a folder of your choice and edit Reg.bat so that it contains the 
  86. correct path for the regsvr32.exe program that comes with VB 4.0.  Please note that 
  87. regsvr32.exe is not copied to your hard-drive automatically when you install VB - 
  88. you can find it in the Tools\Pss folder on your VB CD.
  89.  
  90. Run the edited Reg.bat which will update the Windows registry so that it knows about 
  91. VBMaxLCD.dll.
  92.  
  93. Go into VB, load Demo.vbp and run it.
  94.  
  95. If you want to use the DLL in your own programs, you have to add a reference to it 
  96. as follows:
  97.  
  98. From VB, select Tools from the menu.
  99.  
  100. Then select References
  101.  
  102. Locate VBMax Liquid Crystal Display in the list and click the check box so that an 
  103. X appears in it.  Click OK.
  104.  
  105. The OLE server is now visible in the Object Browser.
  106.  
  107.  
  108.  
  109. FREQUENTLY ASKED QUESTIONS
  110.  
  111. Q.  I try to run your demo program but it keeps telling me that OLE Automation can't 
  112. create the object.  Why?
  113. A.  You have not registered VBMaxLCD.dll with Windows.  Please refer to the installation 
  114. instructions 
  115. above.
  116.  
  117. Q.  I have searched my hard-drive but cannot find regsvr32.exe.  What's the scoop?
  118. A.  Regsvr32.exe is not copied to your hard-drive automatically when you install 
  119. VB - you can find it in the Tools\Pss folder on your VB CD.
  120.  
  121. Q.  Wouldn't it be easier if you just created a regular installation program?
  122. A.  One thing I don't like about VB 4 is the amount of extra baggage that must be 
  123. included with the installation of even the simplest programs-this translates to long 
  124. download times from online services.  
  125.  
  126. Seeing as VBMaxLCD.dll is meant for programmers who already have all the necessary 
  127. software installed on their computers, I decided that manually installing the DLL was 
  128. a fair tradeoff to racking up your online connect time.
  129.  
  130.  
  131.  
  132. TECHNICAL SUPPORT
  133.  
  134. Technical support is available via e-mail.  Please send questions, comments, 
  135. criticisms, etc. to 74632.2227@compuserve.com.
  136.  
  137.  
  138.  
  139. GRONKED FILES
  140.  
  141. These are encrypted files, created using the VBMax Gronk Meister, that contain 
  142. one or more other files.  In this case, the file 'VBMaxLCD Source Code.grk' contains 
  143. the complete, commented VB 4.0 source code for VBMaxLCD.dll.
  144.  
  145. The source files may be extracted using the included VBMax Degronker utility.  Before 
  146. you can do that, however, you need to know the encryption key.  This key will be given 
  147. to you when you register VBMaxLCD.dll.
  148.  
  149.  
  150.  
  151. PACKING LIST
  152.  
  153. Read Me.rtf            The document you are reading.
  154. Demo.vbp (and related files)    Source code for demo program showing the DLL in action.
  155. Reg.bat                Registers the DLL with Windows (you have to edit the path).
  156. Unreg.bat            Unregisters the DLL with Windows (you have to edit the path).
  157. VBMaxLCD Source Code.grk    Complete, commented source code for the DLL in gronked format.
  158. Degronker.exe            Utility to extract the source code from the gronked file.
  159.  
  160.  
  161.  
  162. HOW TO USE THE DLL
  163.  
  164. When you include a reference to VBMaxLCD.dll in VB as described earlier, you will 
  165. have access to a class called clsLCD.  When you select this class using the Object 
  166. Browser, you will see the methods and properties available to you.  You can see a 
  167. brief description of what each one does by clicking on them.
  168.  
  169. In your application, you can create one or more objects from this class module.  
  170. You need a separate object for each LCD control you want to create.
  171.  
  172. Objects are created from this class by using code like this:
  173.  
  174.     Dim moLCD As New clsLCD
  175.  
  176. In the following methods and properties summaries, 'Object' evaluates to an object 
  177. created from clsLCD.  In this example it would be moLCD.
  178.  
  179. You create an LCD control by drawing a PictureBox control on a form and then passing 
  180. it to the Container method in the object created by clsLCD.
  181.  
  182. The DLL provides a high level of control over the appearance of the LCD and also gives 
  183. you the means to blink colons, flash digits and hide or show the unlit segments of the 
  184. digits.  The demo program includes many examples.
  185.  
  186.  
  187.  
  188. METHODS SUMMARY
  189.  
  190.  
  191. Object.About
  192. Displays an About box.
  193.  
  194. Example:        moLCD.About
  195.  
  196.  
  197. Object.Cls
  198. Clears the contents of the LCD.
  199.  
  200. Example:        moLCD.Cls
  201.  
  202.  
  203. Object.Redisplay
  204. Redisplays the current caption.  If you need to change the size of the PictureBox container, 
  205. use this method afterwards to redisplay the LCD at the correct size.
  206.  
  207. Example:        moLCD.Redisplay
  208.  
  209.  
  210. Object.SelectBackColor
  211. Opens up a common dialog color selection window and allows you to select a color for the 
  212. background.
  213.  
  214. Example:        moLCD.SelectBackColor
  215.  
  216. See also the BackColor property and the notes on color selection.
  217.  
  218.  
  219. Object.SelectForeColor
  220. Opens up a common dialog color selection window and allows you to select a color for the digits.
  221.  
  222. Example:        moLCD.SelectForeColor
  223.  
  224. See also the ForeColor property and the notes on color selection.
  225.  
  226.  
  227. Properties Summary
  228.  
  229. Object.Alignment = Setting
  230. Sets or returns a value that determines how the digits are aligned in the PictureBox container.
  231.  
  232. Setting        One of the following:
  233.  
  234.     1) gnALIGN_LEFT
  235.             Left-justifies the digits in the PictureBox.
  236.  
  237.     2) gnALIGN_RIGHT  (default)
  238.         Right-justifies the digits in the PictureBox.
  239.  
  240.     3) gnCENTER
  241.         Centers the digits in the PictureBox.
  242.  
  243. Example:        moLCD.Alignment = gnALIGN_RIGHT
  244.  
  245.  
  246. Object.Autosize = Setting
  247. Sets the Autosize behavior.
  248.  
  249. Setting        One of the following:
  250.  
  251.     1) gnAUTOSIZE_CONTAINER_TO_LCD (default)
  252.         Adjusts the size of the PictureBox container to match the size of the digits.
  253.  
  254.     2) gnAUTOSIZE_LCD_TO_CONTAINER
  255.         Adjusts the size of the digits to match the size of the container.
  256.  
  257.     3) gnAUTOSIZE_OFF
  258.         Makes no adjustment to either the container or the digits.
  259.  
  260. Example:        moLCD.AutoSize = gnAUTOSIZE_CONTAINER_TO_LCD
  261.  
  262.  
  263. Object.BackColor [ = Color]
  264. Sets or returns the background color of the LCD.
  265.  
  266. Color:        A value or constant that determines the background color of an LCD.
  267.         The default color is black.
  268.  
  269. Example 1:    moLCD.BackColor = vbBlue
  270. Example 2:    moLCD.BackColor = &H8000&
  271. Example 3:    lColor = moLCD.BackColor
  272.  
  273. See also the SelectBackColor method and the notes on color selection.
  274.  
  275.  
  276. Object.BlinkColon [ = Boolean]
  277. Sets or returns a value that determines whether colons contained in the display should blink.
  278.  
  279. Boolean:    An expression that evaluates to True or False.
  280.         The default is False.
  281.  
  282. Example 1:    moLCD.BlinkColon = True
  283. Example 2:    bBlink = moLCD.BlinkColon
  284.  
  285. This property is provided so that clock type controls can have blinking colons to mark the 
  286. seconds.  If this property is True, the LCD object will alternately show and hide any colons 
  287. in the display.  It is the responsibility of the application to set a timer to update the 
  288. caption property at the appropriate intervals.  An interval of 500 milliseconds will cause 
  289. the colon to blink about once a second (half a second visible and half a second invisible).
  290.  
  291.  
  292. Object.Caption [ = String]
  293. Sets or returns a value that determines the contents of the LCD.
  294.  
  295. String        A string expression that evaluates to the digits displayed as the caption.
  296.  
  297. Example 1:    moLCD.Caption = "123,456.78"
  298. Example 2:    moLCD.Caption = Format$(Now, "mm-dd-yy")
  299. Example 3:    moLCD.Caption = moLCD.Caption + 1    (Evil Type Coercion)
  300.  
  301.  
  302. Set Object.Container = PictureBox
  303. Mandatory property that specifies the PictureBox used for the LCD.
  304.  
  305. PictureBox    Regular VB PictureBox control.
  306.  
  307. Example:    Set moLCD.Container = picLCD
  308.  
  309.  
  310. Object.FlashDigits [ = Boolean]
  311. Sets or returns a value that determines whether the entire display should flash on and off.
  312.  
  313. Boolean:    An expression that evaluates to True or False.
  314.         The default is False.
  315.  
  316. Example 1:    moLCD.FlashDigits = True
  317. Example 2:    bFlash = moLCD.FlashDigits
  318.  
  319. This property is provided so that controls can flash to draw attention to themselves when 
  320. an event occurs.  Examples could be an alarm clock that flashes when the designated time 
  321. is reached or a nuclear power plant control that flashes when a core meltdown is imminent.
  322.  
  323.  
  324. Object.ForeColor [ = Color]
  325. Sets or returns the color of the digits in the LCD.
  326.  
  327. Color:        A value or constant that determines the digits color of an LCD.
  328.         The default color id red.
  329.  
  330. Example 1:    moLCD.ForeColor = vbBlue
  331. Example 2:    moLCD.ForeColor = &H8000&
  332. Example 3:    lColor = moLCD.ForeColor
  333.  
  334. See also the SelectForeColor method and the notes on color selection.
  335.  
  336.  
  337. Object.ShowUnlitSegments [ = Boolean]
  338. Returns or sets a value that determines whether the unlit segments of the digits are displayed.
  339.  
  340. Boolean:    An expression that evaluates to True or False.
  341.         The default is False.
  342.  
  343. Example 1:    moLCD.ShowUnlitSegments = True
  344. Example 2:    bShowUnlit = moLCD.ShowUnlitSegments
  345. Example 3:    moLCD.ShowUnlitSegments = Not moLCD.ShowUnlitSegments
  346.  
  347. Showing the unlit segments works better with some color combinations than others. For 
  348. instance, red digits against a black background look pretty good but change the digits 
  349. color to white and the effect is not so good.  You will have to experiment to see which 
  350. combinations work for you.  Also, you really need 256 colors or higher for a decent effect.
  351.  
  352.  
  353.  
  354. NOTES ON COLOR SELECTION
  355.  
  356. There are no built-in restrictions about what colors you can use for the digits or the 
  357. background.  Realistically, however, you have to exercise a little caution because of 
  358. potential differences between the color palette settings of your system and those of 
  359. the computers on which your application may run.
  360.  
  361. If your system is running in 16 bit or higher color mode, the colors you choose may look 
  362. a lot different on systems running in 256 colors.  You could end up with dithered colors 
  363. which really don't look that great with LCDs.  A safe approach may be to select solid 
  364. colors only while you have your system running in 256 colors.
  365.  
  366.  
  367.  
  368. Mike Stanley
  369. New Hampshire
  370. USA
  371. E-Mail: 74632.2227@compuserve.com
  372.  
  373.